LassoScript Utility
Basics Browse Detail

[Integer->BitTest]

Tag Link [Integer->BitTest] Category Math
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Integer->BitTest] returns True if the bit specified in the integer parameter is 1 or False otherwise. The bit index should be between 1 and 64.

Syntax

[Integer Variable->(BitTestBit Index)]

Parameters

Required Parameters
Bit Index The index of the bit which is to be inspected.

Examples

To test a bit from an integer value:

Use the [Integer->BitTest] tag. The following example shows a test of bit 3 on the integer 7 (0111) which returns True.

[Variable: 'Result'=7]
[Output: ($Result)->(BitTest: 3)]

True